<?php      //视频组播放列表
		 $PageSize=4;
		 $PreviousPageID=2;//上一页
		 $NextPageID=3;//下一页
		 $numPages=10;//总页数
		 $CurrentPageID=1;//当前页
		 $terms=" and catalog_id=''1001'' ";// and sub_catalog_id='1008' "//韩流id：1001、视频组表：VideoGroup

		 /*$sql="select count(*) as counts from video where 1=1 ".$terms;
		 $Rows=odbc_do($dbconn,$sql);
		 while(odbc_fetch_row($Rows))
		 {
		 $numPages=odbc_result($Rows,"counts");	//获取总行数
		 } */
		 if($numPages>1)
		 {
		 	$numPages=((integer)(($numPages-1)/$PageSize+1));//计算总页数
		 }
		 else
		 {
		 	$numPages=1;
		 }
        if(!empty($_REQUEST["cutPage"]))
        {
		     if($_REQUEST["cutPage"]>0)
		 	    $CurrentPageID=$_REQUEST["cutPage"];
		    else
		 	    $CurrentPageID=1;
        }
		 if($CurrentPageID<1)
		 {
		 	$CurrentPageID=1;
		 }
		 if($CurrentPageID>$numPages)
		 {
		 	$CurrentPageID=$numPages;
		 }

		/* $sql1=" pro_test @videoid = N'1001' ,@pageSize = ".$PageSize.",@currentPage = ".$CurrentPageID.",@ords = N'".$terms."'";
		 $result=odbc_exec($dbconn,$sql1);mb_convert_encoding($video->getSnapshot_big(),"utf-8","gb2312")    iconv("gb2312","utf-8",$video->getSnapshot_big())
		 * mb_convert_encoding($video->getArtist(),"utf-8","gb2312")
		 * */

		  foreach($pagevideos as $video)
		  {
              /*echo "<br>Title标题：".iconv("gb2312","utf-8",$video->getTitle())
                   ."；Artist作者：".iconv("gb2312","utf-8",$video->getArtist())
                   ."；Snapshot_big图片地址：".iconv("gb2312","utf-8",$video->getSnapshot_big())
                   ."；Link数据：".iconv("gb2312","utf-8",$video->getLink())
                   ."relate_rule数据：".iconv("gb2312","utf-8",$video->getRelate_rule())
                    ."；<br>";
              break;*/
              echo "<div class='sp_box'>
            <a href='#' target='_blank'><img src='/".mb_convert_encoding($video->getSnapshot_big(),"utf-8","gb2312")."' /></a>
            <h3><a href='#' target='_blank'>".mb_convert_encoding($video->getTitle(),"utf-8","gb2312")."</a></h3><p >'".iconv("gb2312","utf-8",$video->getArtist())."'...</p>
            </div>";
		  }
        if($numPages>1)
		{
			$str=$CurrentPageID-6;
			$end=$CurrentPageID+5;
			if($str<0)
				$str=0;
			if($end>$numPages)
				$end=$numPages;
				echo "<div class='page_list' style='text-align:right;padding-right:10px;width:625px;padding-top:10px;height:20px;padding-bottom:0px;'>";
			if($CurrentPageID>1)
				echo "<a href='?cutPage=".($CurrentPageID-1)."'>上一页</a> ";
			 for($i=$str;$i<$end;$i++)
			 {
				if($i==($CurrentPageID-1)){
				echo "<a class='now02' href='#'>".($i+1)."</a>";}
				else{
				echo "<a href='?cutPage=".($i+1)."'>".($i+1)."</a>";}
			 }
			 if($CurrentPageID<$numPages)
			 echo " <a href='?cutPage=".($CurrentPageID+1)."'>下一页</a>";
			 echo "</div>";
			}
			?>